//
//  Meal.swift
//  BuilderPatternDemo
//
//  Created by 好米有易 on 2017/9/28.
//  Copyright © 2017年 好米有易. All rights reserved.
//

import UIKit

/// 
class Meal: NSObject {
    override init() {
        super.init()
    }
    
   lazy var list: [Item] = [Item]()
    
    public func addItem(foodItem: Item) {
        
        self.list.append(foodItem)
      
    }
    
    public func getFoodItemInfo() {
        for item in self.list {
            print("item name = \(item.name())")
            print("item price = \(item.price())")
            print("item packing = \(item.pack().packing())")
        }

    }
    
}
